package com.zelix;

import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Iterator;

public class av
        implements Collection {

    private Object a[];

    public av(Object aobj[]) {
        if (aobj == null) {
            throw new IllegalArgumentException();
        } else {
            a = aobj;
        }
    }

    static Object[] a(av av1) {
        return av1.a;
    }

    public boolean add(Object obj) {
        throw new UnsupportedOperationException();
    }

    public boolean addAll(Collection collection) {
        throw new UnsupportedOperationException();
    }

    public void clear() {
        throw new UnsupportedOperationException();
    }

    public boolean contains(Object obj) {
        int i;
        for (i = 0; i < a.length; i++) {
            if (a[i].equals(obj))
                return true;
        }
        return false;
    }

    public boolean containsAll(Collection collection) {
        Iterator iterator1;

        iterator1 = collection.iterator();
        while (iterator1.hasNext()) {
            if (!contains(iterator1.next()))
                return false;
        }
        return true;
    }

    public boolean isEmpty() {
        return a.length == 0;
    }

    public Iterator iterator() {
        return new bv(this);
    }

    public boolean remove(Object obj) {
        throw new UnsupportedOperationException();
    }

    public boolean removeAll(Collection collection) {
        throw new UnsupportedOperationException();
    }

    public boolean retainAll(Collection collection) {
        throw new UnsupportedOperationException();
    }

    public int size() {
        return a.length;
    }

    public Object[] toArray() {
        return a.clone();
    }

    public Object[] toArray(Object aobj[]) {
        if (aobj.length < a.length)
            aobj = (Object[]) Array.newInstance(((Object) (aobj)).getClass().getComponentType(), a.length);
        System.arraycopy(a, 0, aobj, 0, a.length);
        if (aobj.length > a.length)
            aobj[a.length] = null;
        return aobj;
    }
}